home *** CD-ROM | disk | FTP | other *** search
- 100 '
- 103 ' structured demo -- frank digioia
- 105 '
- 110 call prompt
- 120 while a$<>"x"
- 130 if a$="c" then call create:else call read
- 140 call prompt
- 150 wend
- 160 end
- 170 :
- 200 proc create
- 205 call get-name
- 210 open2,8,2,f$+",w"
- 212 print"enter data..."
- 215 call get-key
- 220 repeat
- 225 print a$;
- 230 print#2,a$;
- 235 repeat
- 240 call get-key
- 245 print a$;
- 247 print#2,a$;
- 250 until a$ = chr$(13)
- 255 call get-key
- 260 until a$=chr$(13)
- 265 print#2:close2
- 270 return
- 275 :
- 300 proc read
- 310 call get-name
- 320 open2,8,2,f$
- 330 while st=0
- 340 get#2,a$
- 350 print a$;
- 360 wend
- 370 close2
- 380 return
- 390 :
- 400 proc get-valid-key
- 410 repeat
- 420 call get-key
- 430 until a$="c" or a$="d" or a$="x"
- 440 return
- 450 :
- 500 proc get-key
- 510 a$=""
- 520 while a$=""
- 530 get a$
- 540 wend
- 550 return
- 560 :
- 600 proc get-name
- 610 f$=""
- 620 while f$=""
- 630 input"filename";f$
- 640 wend
- 650 return
- 660 :
- 700 proc prompt
- 710 print"type c to create a data file"
- 720 print"type d to display a data file"
- 730 print"type x to exit program"
- 740 print"note: when creating a data file"
- 750 print"hit <return> twice to end input"
- 760 call get-valid-key
- 770 return
-